home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / chown.z / chown
Text File  |  1998-10-20  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. cccchhhhoooowwwwnnnn((((1111))))                                                              cccchhhhoooowwwwnnnn((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_hhhh_oooo_wwww_nnnn, _cccc_hhhh_gggg_rrrr_pppp - change owner or group
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      cccchhhhoooowwwwnnnn [ ----RRRRffffhhhh ] owner[{.|:}group] file ...
  13.  
  14.      cccchhhhggggrrrrpppp [ ----RRRRffffhhhh ] group file ...
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      cccchhhhoooowwwwnnnn changes the owner of the _f_i_l_e_s to _o_w_n_e_r.  The owner may be either a
  18.      decimal user ID or a login name found in the password file.  An optional
  19.      group, separated from the owner by either a period or a colon, may also
  20.      be specified.  The group may be either a decimal group ID or a group name
  21.      found in the group file.
  22.  
  23.      cccchhhhggggrrrrpppp changes the group ID of the _f_i_l_e_s to _g_r_o_u_p.  The group may be
  24.      either a decimal group ID or a group name found in the group file.
  25.  
  26.      No errors, except for usage errors, are reported when the ----ffff (force)
  27.      option is given.
  28.  
  29.      When the ----RRRR option is given, the command recursively descends its
  30.      directory arguments setting the specified owner or group.  When symbolic
  31.      links are encountered and the ----hhhh option is not given, they are traversed
  32.      and the owner/group of the file referenced by the symbolic link is
  33.      changed.
  34.  
  35.      When the ----hhhh option is given and the file is a symbolic link, change the
  36.      owner/group of the symbolic link.  Without this option, the owner/group
  37.      of the file referenced by the symbolic link is changed.
  38.  
  39.      If either command is invoked by other than the superuser, the set-user-ID
  40.      and set-group-ID bits of the file mode, 04000 and 02000 respectively,
  41.      will be cleared.
  42.  
  43.      Only the owner of a file (or the superuser) may change the owner or group
  44.      of that file.
  45.  
  46.      However, if the variable _r_e_s_t_r_i_c_t_e_d__c_h_o_w_n is enabled (see _iiii_nnnn_tttt_rrrr_oooo(2) and
  47.      _ssss_yyyy_ssss_tttt_uuuu_nnnn_eeee(1M)) then only the superuser can change the owner of the file,
  48.      because if users were able to give files away, they could defeat the file
  49.      space accounting procedures.  The owner of the file may change the group
  50.      ownership only to those groups of which he is a member.
  51.  
  52. FFFFIIIILLLLEEEESSSS
  53.      /etc/passwd
  54.      /etc/group
  55.  
  56. NNNNOOOOTTTTEEEESSSS
  57.      Because cccchhhhoooowwwwnnnn uses a depth-first algorithm to recursively descend its
  58.      directory arguments, there is a limitation to how deep it can descend
  59.      which is dependent on the number of file descriptors available to a given
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. cccchhhhoooowwwwnnnn((((1111))))                                                              cccchhhhoooowwwwnnnn((((1111))))
  71.  
  72.  
  73.  
  74.      shell.  _ffff_iiii_nnnn_dddd(1) can be used if one needs to descend deeper than a given
  75.      configuration will allow.
  76.  
  77. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  78.      chmod(1), find(1), chown(2), group(4), passwd(4), stat(4).
  79.  
  80. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  81.      _cccc_hhhh_oooo_wwww_nnnn and _cccc_hhhh_gggg_rrrr_pppp will exit with a status of 0 if all file operations
  82.      completed successfully.  If there are any failures, the exit status will
  83.      be > 0.
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.